#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "WriteLinkAction.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class LinkEndDestructionData;

/// <summary>
/// DestroyLinkAction
/// A DestroyLinkAction is a WriteLinkAction that destroys links (including link
/// objects).
/// </summary>
class UMLMODEL_EXPORT DestroyLinkAction : public WriteLinkAction {

public: // Constructors and destructors
    explicit DestroyLinkAction(const QString& umlType="uml::DestroyLinkAction");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// endDatas getter
    /// The LinkEndData that the values of the Association ends for the links to be
    /// destroyed.
    /// </summary>
    vector<shared_ptr<LinkEndDestructionData>>& endDatas();

private: // Fields
    /// <summary>
    /// endDatas
    /// The LinkEndData that the values of the Association ends for the links to be
    /// destroyed.
    /// </summary>
    vector<shared_ptr<LinkEndDestructionData>> endDatas_;

};

} // namespace uml
